﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;

namespace ServiceFramework.Tests
{
    public class Wait : ITimeSyntax
    {
        private static readonly Wait _instance = new Wait();

        private double _timeValue;

        private Wait()
        {
            
        }

        public static ITimeSyntax For(double value)
        {
            _instance._timeValue = value;
            return _instance;
        }

        public void Seconds()
        {
            Thread.Sleep((int)(_timeValue*1000));
        }

        public void Milliseconds()
        {
            Thread.Sleep((int)_timeValue);
        }
    }

    public interface ITimeSyntax
    {
        void Seconds();
        void Milliseconds();
    }
}
